package com.etooling.framework.entity;


import com.etooling.framework.svo.AbstractEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;


/**
 * 功能模块
 */
@Entity
@Table(name = "t_func_module", schema = "framework")
public class FuncModule extends AbstractEntity {
    final public static String RUNNING_STATUS = "启用";
    final public static String STOP_STATUS = "停用";
    private String funcType;//类型:菜单、功能模块、按钮
    private String name;//功能名
    private String parentId;//上级id
    private String url;//引用路径
    private String urlOpenType;//连接打开方式
    private String status;//状态
    private String moduleIcon;//菜单的图票
    private String isSuperFunc;//是否超级功能，只有角色是超级用记才能查看
    private Integer seq;//顺序
    private String winType;//打开屏的类型
    private String menuIconSource;//菜单图标来源
    private String menuIcon;//菜单图标
    private String companyId;

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public FuncModule() {
        super();
    }

    public FuncModule(String companyId, String seq, String name, String funcType, String urlOpenType, String parentId, String url, String isSuperFunc, String winType) {
        super();
        this.funcType = funcType;
        this.parentId = parentId;
        this.name = name;
        this.url = url;
        this.isSuperFunc = isSuperFunc;
        this.status = RUNNING_STATUS;
        this.urlOpenType = urlOpenType;
        this.winType = winType;
        this.companyId = companyId;
    }


    public String getMenuIconSource() {
        return menuIconSource;
    }

    public void setMenuIconSource(String menuIconSource) {
        this.menuIconSource = menuIconSource;
    }

    public String getMenuIcon() {
        return menuIcon;
    }

    public void setMenuIcon(String menuIcon) {
        this.menuIcon = menuIcon;
    }

    public String getWinType() {
        return winType;
    }

    public void setWinType(String winType) {
        this.winType = winType;
    }

    @Transient
    private List<FuncModule> children;

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public String getIsSuperFunc() {
        return isSuperFunc;
    }

    public void setIsSuperFunc(String isSuperFunc) {
        this.isSuperFunc = isSuperFunc;
    }


    @Transient
    public List<FuncModule> getChildren() {
        return children;
    }

    @Transient
    public void setChildren(List<FuncModule> children) {
        this.children = children;
    }

    public String getModuleIcon() {
        return moduleIcon;
    }

    public void setModuleIcon(String moduleIcon) {
        this.moduleIcon = moduleIcon;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getUrlOpenType() {
        return urlOpenType;
    }

    public void setUrlOpenType(String urlOpenType) {
        this.urlOpenType = urlOpenType;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getFuncType() {
        return funcType;
    }

    public void setFuncType(String funcType) {
        this.funcType = funcType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
}